package com.program.facesigninsystem.service.impl;

import com.program.facesigninsystem.dao.IClassesDao;
import com.program.facesigninsystem.entity.Classes;
import com.program.facesigninsystem.service.IClassesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Qualifier("Classes")
public class ClassesService implements IClassesService {
    @Autowired
    private IClassesDao iClassesDao;

    @Override
    public Classes selectClasses(String cid) {
        Classes classes = iClassesDao.selectClasses(cid);
        return classes;
    }

    @Override
    public void insertClasses(String cid,String name,int count,String tid) {
        iClassesDao.insertClasses(cid,name,count,tid);
    }

    @Override
    public void updateClasses(String cid) {
        iClassesDao.updateClasses(cid);
    }

    @Override
    public List<Classes> selectClassListByTid(String tid) {
        List<Classes> classes = iClassesDao.selectClassListByTid(tid);
        return classes;
    }
}
